package main

import (
	"fmt"
	"reflect"
)

// 结构体定义
type person struct {
	name string
	age  int8
	city string
}

func main() {
	p3 := &person{}
	fmt.Println(reflect.TypeOf(p3)) // *main.person
	fmt.Printf("p3=%#v\n", p3)      // p3=&main.person{name:"", age:0, city:""}
	p3.name = "June"
	p3.age = 18
	p3.city = "成都"
	fmt.Printf("p3=%#v\n", p3) // p3=&main.person{name:"June", age:18, city:"成都"}
}
